#ifndef READER_H
#define READER_H

#include <QRunnable>
#include <QObject>
#include "shelf.h"

class Reader : public QObject, public QRunnable
{
    Q_OBJECT
public:
    explicit Reader(int readTime, Shelf *shelf, QObject *parent = 0);

    void run();

signals:
    void actived();
    void waited();

    void activeChange(bool active);

private slots:
    void activeChanged(bool active);

private:
    int readTime;
    Shelf *shelf;
    
    bool isActive;
};

#endif // READER_H
